<!--_header 作为公共模版分离出去-->
<header class="navbar-wrapper">
    <div class="navbar navbar-fixed-top">
        <div class="container-fluid cl">
            <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/admin">后台管理</a>
            <span class="logo navbar-slogan f-l mr-10 hidden-xs">v{$sys_version}</span>
            <nav class="nav navbar-nav">
                <ul class="cl">
                    <li style="position: absolute;left: 200px;">
                        <a href="javascript:;"><i class="Hui-iconfont">&#xe67f;</i> 主菜单 </a>
                        <!-- <a href="javascript:;"><i class="Hui-iconfont">&#xe621;</i> 内容管理 </a> -->
                    </li>
                </ul>
            </nav>
            <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                <ul class="cl">
                    <li class="li_time">
                        <i class="Hui-iconfont">&#xe690;</i>
                        <span id="top_time"></span>
                    </li>
                    <li>
                        <a aria-hidden="false" class="logo navbar-logo f-l mr-10 hidden-xs" href="/sys/index.html">
                            <i class="Hui-iconfont">&#xe625;</i>系统首页</a>
                        <a aria-hidden="false" class="logo navbar-logo f-l mr-10 hidden-xs" href="/index.html"
                            target="_blank">
                            <i class="Hui-iconfont">&#xe67f;</i>网站首页</a>
                    </li>
                    <li class="dropDown dropDown_hover">
                        <a href="javascript:;" class="dropDown_A " style="width: 240px;">{:session('adminuser.username')}<i
                                class="Hui-iconfont">&#xe6d5;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li>
                                <img src="{:session('adminuser.avatar') ?: '/static/images/user-64x64.png'}"
                                    style="width: 200px;" title="avator" class="img-circle" onclick="modifyAvatar();">
                                <a href="javascript:void(0);">上次登录时间：{:session('adminuser.perTime')}</a>
                                <a href="javascript:void(0);">上次登录IP：{:session('adminuser.perIp')}</a>
                            </li>
                            <li><a href="javascript:void(0);">超级管理员</a></li>
                            <li><a href="javascript:modifyPassword();">修改密码</a></li>
                            <li><a href="javascript:logout();">退出</a></li>
                        </ul>
                    </li>
                    <!-- <li id="Hui-msg"> <a href="#" title="消息"><span class="badge badge-danger">1</span><i
                                class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a> </li> -->
                    <li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A"
                            title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                            <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                            <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                            <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                            <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                            <li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<!--/_header 作为公共模版分离出去-->
<!--_menu 作为公共模版分离出去-->
<aside class="Hui-aside">
    <div class="menu_dropdown bk_2">
        <dl id="menu-article-home">
            <dt>
                <a href="{:url('/sys/index')}"><i class="Hui-iconfont">&#xe625;</i> 首页</a>
            </dt>
        </dl>
        {foreach $menus as $value}
        <dl id="menu-article">
            {eq name="value.type" value="1"}
            <dt {eq name="value.menuid" value="$active_pid" } class="selected" {/eq}>
                <a href="/sys{:url($value.url)}"><i class="Hui-iconfont">{$value.icon|raw}</i> {$value.name}</a>
            </dt>
            {else/}
            <dt {eq name="value.menuid" value="$active_pid" } class="selected" {/eq}>
                <i class="Hui-iconfont">{$value.icon|raw}</i> {$value.name}
                <i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
            </dt>
            <dd {eq name="value.menuid" value="$active_pid" }style="display:block" {/eq}>
                {notempty name='value.child'} {foreach $value.child as $val}
                <ul>
                    <li>
                        <a {notempty name='val.url' } href="/sys/{$val.url}.html">{/notempty} <i
                                class="Hui-iconfont">{$val.icon|raw}</i> {$val.name}</a>
                    </li>
                </ul>
                {/foreach} {/notempty}
            </dd>
            {/eq}
        </dl>
        {/foreach}
    </div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" title="jt" onClick="displaynavbar(this)"></a>
</div>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    // 退出登陆
    function logout() {
        layer.confirm('纳尼,要退出？', function (index) {
            window.location.href = "{:url('/sys/login/logout')}";
        })
    }

    // 修改密码
    function modifyPassword() {
        var url = "{:url('/sys/sys_user/password')}" + "?_layer=true";
        layer_show('修改密码', url, 500, 400);
    }

    // 修改密码
    function modifyAvatar() {
        var url = "{:url('/sys/sys_user/avatar')}" + "?_layer=true";
        layer_show('更换头像', url, 420, 540);
    }

    // 按钮权限问题
    function isAuth(key) {
        var permissions = sessionStorage.getItem('permissions').split(",") || '[]';

        // console.log(JSON.parse('[]'));
        // console.log(permissions);
        return permissions.indexOf(key) !== -1 || false
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->